Skip to content

Rollup of 11 pull requests #143582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Jul 7, 2025
Merged

Rollup of 11 pull requests #143582

merged 31 commits into from
Jul 7, 2025

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Jul 7, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Gelbpunkt and others added 30 commits July 4, 2025 10:46
The dist-powerpc64le-linux-musl runner never actually used the toolchain
that the script produced, it instead used the one from crosstool-ng.

The dist-powerpc64le-linux-gnu runner did use it, from what I can tell
mainly to get a glibc 2.17 version with ppc64le support backported.
Since crosstool-ng has the necessary patches, we can just use
crosstool-ng to get an appropriate toolchain. While at it, use kernel
3.10 headers since that's the version documented in platform support for
this target.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
This PR does 2 things:

- It removes the braces when there's a single element. This is required since brace expansion (at
  least in bash and zsh) only triggers if there's at least 2 elements.

- It removes the extra `.rlib` suffixes of the elements. See
  rust-lang#135707 (comment) for context.

Running `cargo +stage1 build` on the following program:

```rust
unsafe extern "C" {
    fn foo() -> libc::c_int;
}

fn main() {
    let x = unsafe { foo() } as u32;
    // println!("{}", data_encoding::BASE64.encode(&x.to_le_bytes()));
}
```

Gives the following diff before and after the PR:

```diff
-/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib}.rlib
+/tmp/foo/target/debug/deps/liblibc-faf416f178830595.rlib
```

Running on the same program with the additional dependency, we get the following diff:

```diff
-/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib,libdata_encoding-84bb5aadfa9e8839.rlib}.rlib
+/tmp/foo/target/debug/deps/{liblibc-faf416f178830595,libdata_encoding-84bb5aadfa9e8839}.rlib
```

Do we want to add a UI test?
…the`stable_mir` crate

As part of this reorganization, some traits need to be moved from `rustc_smir::context::traits` to `stable_mir::unstable::internal_cx`. These traits are specifically designed for `InternalCx` to clarify the behavior of different functions that share the same name. This move is necessary to avoid orphan rule violations.
This currently gets called only once, but will get called multiple times
when handling attributes.
Will get called additional times when expanding parsing to cover
attributes
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Co-authored-by: beef <ent3rm4n@gmail.com>
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Removing this reference was forgotten in eb4725f. Grepping for
no_landing_pads returns no hits after this.
There is one comment at a call site and one comment in the function
definition that are mostly saying the same thing. Fold the call site
comment into the function definition comment to reduce duplication.

There are actually some inaccuracies in the comments but let's
deduplicate before we address the inaccuracies.
The feature currently completely breaks `x test`, core functionality of working on the standard library.
Therefore it should be disabled by default until that problem is fixed.
Having to wait a bit longer for a check build is nothing compared to completely mysterious build errors when testing.
doc(std): clarify `NonZero<T>` usage limitation in doc comment

Closes rust-lang#142966

This PR clarifies `NonZero<T>` usage limitation in doc comment and fixes a typo.

r? libs
…lchain, r=marcoieni

Get rid of build-powerpc64le-toolchain.sh

The dist-powerpc64le-linux-musl runner never actually used the toolchain that the script produced, it instead used the one from crosstool-ng.

The dist-powerpc64le-linux-gnu runner did use it, from what I can tell mainly to get a glibc 2.17 version with ppc64le support backported. Since crosstool-ng has the necessary patches, we can just use crosstool-ng to get an appropriate toolchain. While at it, use kernel 3.10 headers since that's the version documented in platform support for this target.

try-job: dist-powerpc64le-linux-gnu
try-job: dist-powerpc64le-linux-musl
…-compile, r=oli-obk

Make tests/ui/abi/debug.rs cross-compile

Resumption of rust-lang#141979, making the test cross-compile.
Fix short linker error output

This PR does 2 things:

- It removes the braces when there's a single element. This is required since brace expansion (at least in bash and zsh) only triggers if there's at least 2 elements.

- It removes the extra `.rlib` suffixes of the elements. See rust-lang#135707 (comment) for context.

Running `cargo +stage1 build` on the following program:

```rust
unsafe extern "C" {
    fn foo() -> libc::c_int;
}

fn main() {
    let x = unsafe { foo() } as u32;
    // println!("{}", data_encoding::BASE64.encode(&x.to_le_bytes()));
}
```

Gives the following diff before and after the PR:

```diff
-/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib}.rlib
+/tmp/foo/target/debug/deps/liblibc-faf416f178830595.rlib
```

Running on the same program with the additional dependency, we get the following diff:

```diff
-/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib,libdata_encoding-84bb5aadfa9e8839.rlib}.rlib
+/tmp/foo/target/debug/deps/{liblibc-faf416f178830595,libdata_encoding-84bb5aadfa9e8839}.rlib
```
Move `stable_mir` back to its own crate

We've finished the refactoring, so it's time to move `stable_mir` back to its own crate.

This PR leaves an empty `rustc_internal` module with a `#[deprecated]` attribute in `rustc_smir` to let users know we just moved it to `stable_mir`.
interpret: rename StackPopCleanup

The name `StackPopCleanup` stopped making sense a long time ago IMO -- in the common case, it has nothing to do with "cleanup", and everything with where the program should jump next. If we didn't have unwinding this would be just the return block, but given that we do have unwinding I figured maybe "continuation" would be a good name. This comes up in [continuation-passing style](https://en.wikipedia.org/wiki/Continuation-passing_style) and refers to where the program will *continue* when a function is done. So from a PL perspective it is the most fitting term I think -- but it may be too jargony.

r? `@oli-obk` what do you think?
Dont resolve instance of root in `mir_callgraph_cyclic`

`Instance::try_resolve` on a default trait body method will always fail, since it's still possible to further substitute. This leads to a cycle, since in `tests/mir-opt/inline_default_trait_body.rs`, both `Trait::a` and `Trait::b` need to consider the other to be cyclical, but since we couldn't resolve a body, we'd just consider *nothing* to be cyclical.

The root instance we care about when computing `mir_callgraph_cyclic` is trivial to compute (it's just `InstanceKind::Item`), so just replace it with a call to `Instance::new_raw`.

r? `@cjgillot` `@oli-obk`

Fixes rust-lang#143534
…rowLii

mbe: Refactors and function extractions in `compile_declarative_macro`

These refactors help pave the way for parsing attribute rules.

Best reviewed commit-by-commit.

- **mbe: Simplify compile_declarative_macro by factoring out some variables**
- **mbe: Factor out a helper to check an LHS**
- **mbe: Factor out a helper to check for unexpected EOF in definition**
- **mbe: Clarify comments about error handling in `compile_declarative_macro`**
std: fix typo in `std::path`

I noticed that most of the document used `'` instead of `’`, so I adjusted it.

r? `@ibraheemdev`
…mment, r=oli-obk

compiler: Deduplicate `must_emit_unwind_tables()` comments

There is one comment at a call site and one comment in the function definition that are mostly saying the same thing. Fold the call site comment into the function definition comment to reduce duplication.

There are actually some inaccuracies in the comments but let's deduplicate before we address the inaccuracies.
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 7, 2025
@jieyouxu
Copy link
Member Author

jieyouxu commented Jul 7, 2025

@bors r+ rollup=never p=5

@rustbot rustbot added the rollup A PR which is a rollup label Jul 7, 2025
@bors
Copy link
Collaborator

bors commented Jul 7, 2025

📌 Commit 364dbd6 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 7, 2025
@bors
Copy link
Collaborator

bors commented Jul 7, 2025

⌛ Testing commit 364dbd6 with merge 1b0bc59...

@bors
Copy link
Collaborator

bors commented Jul 7, 2025

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 1b0bc59 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 7, 2025
@bors bors merged commit 1b0bc59 into rust-lang:master Jul 7, 2025
12 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 7, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#143130 doc(std): clarify NonZero<T> usage limitation in doc comm… 8b2da5c39436fc3731af63cb2d87825c4625aaa7 (link)
#143415 Get rid of build-powerpc64le-toolchain.sh 2494f5607b5fc6427a138c67c5720023a5c3901c (link)
#143464 Make tests/ui/abi/debug.rs cross-compile 98b63157a1e7ec5fff5dad060f36a6b49e842129 (link)
#143482 Fix short linker error output 2fca974f7350375d00d767ee25e68b7f45f059c3 (link)
#143524 Move stable_mir back to its own crate 597570a767394e0476facaff8dd3112c8c4bf8ad (link)
#143528 interpret: rename StackPopCleanup c5b834092d0b618b9313ccffee0d418421fda660 (link)
#143551 Dont resolve instance of root in mir_callgraph_cyclic 05be111cfa76177236801adb7e6637733cab6939 (link)
#143558 mbe: Refactors and function extractions in `compile_declara… 013f2c0003dc95e7954ceb4087a0fc5cf519bd0a (link)
#143563 std: fix typo in std::path c185c83e8e1e7569de3b0fa382aadda09f9d6f83 (link)
#143564 compiler: Deduplicate must_emit_unwind_tables() comments 4819110e201e87e8fc93e8d83032d52872f25381 (link)
#143577 Disable download-rustc for library profile d54decab01a1f5809a82e48e7f03a101475e3ffe (link)

previous master: 25cf7d13c9

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

Copy link
Contributor

github-actions bot commented Jul 7, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 25cf7d1 (parent) -> 1b0bc59 (this PR)

Test differences

Show 864 test diffs

Stage 1

  • [mir-opt] tests/mir-opt/inline_default_trait_body.rs: [missing] -> pass (J0)
  • [ui] tests/ui/abi/debug.rs: pass -> [missing] (J0)
  • [ui] tests/ui/abi/debug.rs#generic: [missing] -> pass (J0)
  • [ui] tests/ui/abi/debug.rs#riscv64: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/abi/debug.rs: pass -> [missing] (J1)
  • [ui] tests/ui/abi/debug.rs#generic: [missing] -> pass (J1)
  • [ui] tests/ui/abi/debug.rs#riscv64: [missing] -> pass (J1)
  • [mir-opt] tests/mir-opt/inline_default_trait_body.rs: [missing] -> pass (J2)

Additionally, 856 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 1b0bc594a75dfc1cdedc6c17052cf44de101e632 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-linux: 8335.4s -> 5769.0s (-30.8%)
  2. dist-x86_64-apple: 8132.4s -> 9821.2s (20.8%)
  3. x86_64-mingw-1: 8658.0s -> 10358.2s (19.6%)
  4. dist-apple-various: 6649.4s -> 7932.5s (19.3%)
  5. x86_64-gnu-llvm-20-3: 6806.2s -> 7442.9s (9.4%)
  6. x86_64-apple-1: 7599.9s -> 6904.1s (-9.2%)
  7. dist-x86_64-netbsd: 4621.6s -> 5036.0s (9.0%)
  8. dist-armhf-linux: 4793.2s -> 5217.2s (8.8%)
  9. x86_64-apple-2: 5658.1s -> 6156.3s (8.8%)
  10. dist-powerpc-linux: 4950.8s -> 5365.8s (8.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1b0bc59): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -0.2%, secondary 3.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.1% [0.8%, 1.3%] 2
Regressions ❌
(secondary)
3.6% [2.0%, 5.2%] 2
Improvements ✅
(primary)
-2.8% [-2.8%, -2.8%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-2.8%, 1.3%] 3

Cycles

Results (primary 3.0%, secondary 2.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.0% [2.1%, 4.5%] 3
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.0% [2.1%, 4.5%] 3

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 464.368s -> 464.431s (0.01%)
Artifact size: 372.14 MiB -> 372.18 MiB (0.01%)

@jieyouxu jieyouxu deleted the rollup-8t9mhfj branch July 8, 2025 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.